<?php
header("content-type:text/html;charset=utf-8");
include("../conn/conn.php");
session_start();
$id=$_GET['id'];
$sql="select * from tb_liu where id=".$id;
$result_v=mysqli_query($link,$sql);
if(mysqli_num_rows($result_v)>0){
	$rows_v=mysqli_fetch_assoc($result_v);
	if($rows_v['state']==1){
		$sql_up="update tb_liu set state=2 where id=".$id;
		mysqli_query($link,$sql_up);
		echo ("<script> alert('审核成功！');location='pl_gl.php';</script>");
	}
	else{
		$sql_up="update tb_liu set state=1 where id=".$id;
		mysqli_query($link,$sql_up);
		echo ("<script> alert('冻结成功！');location='pl_gl.php';</script>");
		}
}
else{
	echo ("<script> alert('没有记录！');location='pl_gl.php';</script>");
	
	}

?>

	
